<style>
	#ui-datepicker-div.ui-widget-content{background: #fff;border: 1px solid gray;}
	table{text-align: left;width: 100%;}
	table tr th{background-color: #eeeeee;}
	table tr td,table tr th{border: 1px solid #d3d2d2;padding: 10px;}
	table input{width: 80px;height: 20px;}
	
	table label{display: inline-block;cursor: default;margin: 0 3px;}
	table input[type="checkbox"],table input[type="radio"]{margin: 0;cursor: default;margin-top: -2px;}
	table .thSetPrice a{
		display: block;margin: 5px 0;padding: 3px 5px;border: 1px solid #888888;background-color: #888888;
		color: #fff;text-decoration: none;text-align: center;width: 60px;cursor: pointer;
	}
	table a:hover{text-decoration: none;background-color: #368ee0;border-color: #368ee0;}
	
	.page{padding: 5px;border: 2px solid #368ee0;border-top: none;}
	.page .page_count{padding-top: 5px;}
	.page .page_count label{display: inline-block;line-height: 30px;font-weight: normal;float: left;}
	.page .page_count .paginate_button{
		margin: 0 5px;
		float: left;
		background-color: #D5D5D5;
		padding: 5px 12px;
		color: #7d7d7d;
		border-radius: 3px;
	}
	.page .page_count .paginate_button:hover{
		background-color: #89affc;
		color: #fff;
	}
	.page .page_count .paginate_active{
		margin: 0 5px;
		float: left;
		padding: 5px 12px;
		color: #fff;
		background-color: #89affc;
		border-radius: 3px;
	}
	.page a{text-decoration: none;}
	.page b{color: #FF4500;}
	
	.box-title a{float: right;border: 1px solid #5bc0de;background: #5bc0de;color: #fff;padding: 3px 8px;border-radius: 3px;margin-right: 10px;}
	table tbody tr:hover{background-color: #D9D9D9;}
</style>
<div id="main">
    <div class="container-fluid">
        <div class="page-header">
        	<div class="pull-left">
        		<h1>酒店列表</h1>
        	</div>
        	<div class="pull-right">
        		<ul class="stats">
        			<li class='lightred'>
        				<i class="icon-calendar"></i>
        				<div class="details">
        					<span class="big"></span>
        					<span></span>
        				</div>
        			</li>
        		</ul>
        	</div>
        </div>
        <div class="breadcrumbs">
        	<ul>
        		<li>
        			<a href="javascript:void(0);">后台管理</a>
        			<i class="icon-angle-right"></i>
        		</li>
        		<li>
        			<a href="javascript:void(0);">商家管理</a>
        			<i class="icon-angle-right"></i>
        		</li>
        		<li>
        			<a href="javascript:void(0);">酒店列表</a>
        		</li>
        	</ul>
        	<div class="close-bread">
        		<a href="#"><i class="icon-remove"></i></a>
        	</div>
        </div>
        <div class="row-fluid">
        	<div class="span12">
        		<div class="box box-color box-bordered">
        			<div class="box-title">
        				<h3>
        					<i class="icon-th-list"></i>
        					酒店列表
        				</h3>
        			</div>
					<link rel="stylesheet" href="/public/assets/sysadmin/mylzp/css/jquery-ui.css">
					<script type="text/javascript" src="/public/assets/sysadmin/mylzp/js/jquery-ui.js"></script>
					<div style="border: 2px solid #368ee0;border-top: none;border-bottom: none;padding: 10px;">
						<form action="" method="get" style="margin: 0;padding: 0;">
							关键字 <input type="text" name="nameKey" value="<?=$nameKey?>" placeholder="多个关键字用半角逗号','分开" style="margin-top: 5px;width: 300px;" />
							<button style="border: 1px solid transparent;background-color: #368ee0;color: #fff;padding: 3px 8px;margin-top: -5px;">查询</button>
							<a href="<?=$this->url('user/hotel')?>" style="color: red;margin-left: 10px;">显示全部</a>
						</form>
					</div>
                    <div style="border: 2px solid #368ee0;border-top: none;<?=$number>1?'border-bottom: none;':''?>">
                        <table>
        					<thead>
        						<tr>
        							<th>酒店名称</th>
        							<th width="50px">酒店星级</th>
        							<th>酒店电话</th>
                                    <th>酒店地址</th>
                                    <th>酒店描述</th>
                                    <th>酒店设施</th>
                                    <th>酒店政策</th>
                                    <th>酒店周边</th>
                                    <th width="50px">状态</th>
                                    <th width="50px">操作</th>
        						</tr>
        					</thead>
                            <tbody>
                             <?
							 if($re){
								foreach($re as $k=>$v){
                                    ?>
                                    <tr>
            							<td><?=$v['hotelName']?></td>
            							<td><?=empty($v['star'])?'无星级':($v['star'].'星级')?></td>
                                        <td><?=$v['tel']?></td>
            							<td><?=$v['pName'].'-'.$v['cName'].'-'.$v['dName'].' '.$v['address']?></td>
            							<td><?=$v['introduce']?></td>
                                        <td>
                                            <?
                                            if($v['devices']){
												$devices="";
                                                foreach($v['devices'] as $key=>$val){
													if($key==0){
														$devices.=$val['title'];
													}else{
														$devices.=','.$val['title'];
													}
                                                }
												echo $devices;
                                            }
                                            ?>
                                        </td>
                                        <td><?=$v['policy']?></td>
                                        <td><?=$v['ambitus']?></td>
                                        <td><?=$v['status']==1?"<font color='green'>正常<font>":"<font color='red'>冻结<font>"?></td>
                                        <td>
                                            <a href="javascript:pub_alert_confirm(this,'确定该操作？','<?=$this->url("user/hotelStatus")?>?id=<?=$v["id"]?>');" class="btn btn-small btn-danger" style="background-color: <?=$v['status']==1?'':'#40bf40'?>;"><?=$v['status']==1?'禁用':'使用'?></a>
                                        </td>
            						</tr>
                                    <?
                                }
							 }else{?>
								<tr><td colspan="10" style="text-align: center;font-size: 20px;">没有相关记录</td></tr>
							 <?}
                                
                            ?>
                            </tbody>
        				</table>
                    </div>
                    <?if($re&&$number>1){?><div class="page"><?=$pageHtml?></div><?}?>
                </div>
        	</div>
        </div>
    </div>
</div>